Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.pacist.diamonds.DiamondCanvas | +--com.pacist.diamonds.DrawnButton | +--com.pacist.diamonds.FlexiButton
Field Summary | |
boolean | canMeasure
Determines whether the button may use the dimensions of the image and label or not. |
java.awt.Image | downDisabledImage
The image displayed when the button is being held down, but disabled. |
java.awt.Image | downImage
The image displayed when the button is being held down. |
boolean | draw3DLabel
Determines whether a 3D label should be drawn or not. |
int | height
Height of FlexiButton. |
int | hMargin
Horizontal margin. |
int | imagePos
Position of image relative to the label. |
java.lang.String | label
The text label for the button. |
boolean | showImage
Determines whether the image should be shown or not. |
boolean | showLabel
Determines whether the label should be shown or not. |
int | spacing
Space between the image and the label. |
java.awt.Image | upDisabledImage
The image displayed when the button is untouched, but disabled. |
java.awt.Image | upImage
The image displayed when the button is untouched. |
int | vMargin
Vertical margin. |
int | width
Width of FlexiButton. |
Fields inherited from class com.pacist.diamonds.DrawnButton | |
armed, behaviour, BUTTON, buttonListeners, flags, LABEL, mouseIn, NOTIFY_ARM, NOTIFY_DISARM, RADIO, SHADOW_ALL, SHADOW_BORDER, SHADOW_BOTTOM, SHADOW_LEFT, SHADOW_NONE, SHADOW_RIGHT, SHADOW_ROUNDED, SHADOW_TOP, shadowType, state, states, TOGGLE, tracking, TRISTATE, what |
Fields inherited from class com.pacist.diamonds.DiamondCanvas | |
tipText |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
FlexiButton()
Creates and initializes a FlexiButton object, with the behaviour of a button. |
|
FlexiButton(java.awt.Image label)
Creates and initializes a FlexiButton object, with the behaviour of a button, and using the specified image. |
|
FlexiButton(java.lang.String label)
Creates and initializes a FlexiButton object, with the behaviour of a button, and using the specified label. |
|
FlexiButton(java.lang.String label,
java.awt.Image upImage,
int behaviour)
Creates and initializes a FlexiButton object, with the specified behaviour, label, and image. |
|
FlexiButton(java.lang.String label,
java.awt.Image upImage,
java.awt.Image downImage,
int behaviour)
Creates and initializes a FlexiButton object, with the specified behaviour, label, unpressed-image, and pressed-image. |
|
FlexiButton(java.lang.String label,
java.awt.Image upImage,
java.awt.Image downImage,
java.awt.Image upDisabledImage,
java.awt.Image downDisabledImage,
int behaviour)
Creates and initializes a FlexiButton object, with the specified behaviour, label, unpressed-image, pressed-image, unpressed-disabled-image, and pressed-disabled-image. |
Method Summary | |
void | addNotify()
Function called when the peer has been created. |
java.awt.Image | getCurrentImage()
Returns the current image being shown on the button. |
java.awt.Image | getDownDisabledImage()
Gets the current up/unpressed image for the button. |
java.awt.Image | getDownImage()
Gets the current down/pressed image for the button. |
boolean | getDraw3DLabel()
Determines whether the a 3D label is being shown or not. |
int | getHMargin()
Gets the horizontal margin. |
int | getImagePosition()
Gets the current compass position of the image. |
java.awt.Image[] | getImages()
Returns an array of all images used in the FlexiButton. |
java.lang.String | getLabel()
Gets the label for the FlexiButton. |
java.awt.Dimension | getLargestImageSize()
Returns the maximum width and height out of all of the images. |
boolean | getShowImage()
Determines whether the image is being shown or not. |
boolean | getShowLabel()
Determines whether the label is being shown or not. |
int | getSpacing()
Gets the value of the spacing variable, which determines the space between the label and the image. |
java.awt.Image | getUpDisabledImage()
Gets the current up/unpressed image for the button. |
java.awt.Image | getUpImage()
Gets the current up/unpressed image for the button. |
int | getVMargin()
Gets the vertical margin. |
void | measure()
Calculates the width and height of the FlexiButton based on the size of the label and image. |
void | paintButton(java.awt.Graphics g,
boolean down)
|
java.awt.Dimension | preferredSize()
Gets the preferred size of the FlexiButton. |
void | setDownDisabledImage(java.awt.Image ddl)
Sets the down/pressed disabled image for the button. |
void | setDownImage(java.awt.Image dl)
Sets the down/pressed image for the button. |
void | setDraw3DLabel(boolean draw3DLabel)
Sets whether the label should be shown in 3D or not. |
void | setHMargin(int hMargin)
Sets the horizontal margin. |
void | setImagePosition(int imagePos)
Sets the current position of the image. |
void | setLabel(java.lang.String label)
Sets the label for the FlexiButton. |
void | setShowImage(boolean showImage)
Sets whether the image should be shown or not. |
void | setShowLabel(boolean showLabel)
Sets whether the label should be shown or not. |
void | setSpacing(int spacing)
Sets the amount of space between the label and the image. |
void | setUpDisabledImage(java.awt.Image udl)
Sets the up/unpressed disabled image for the button. |
void | setUpImage(java.awt.Image ul)
Sets the up/unpressed image for the button. |
void | setVMargin(int hMargin)
Sets the vertical margin. |
Methods inherited from class com.pacist.diamonds.DrawnButton | |
addActionListener, getBehaviour, getButtonListeners, getNotify, getShadowType, getState, inButton, isArmed, isDown, isSet, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintButton, paint, processAction, removeActionListener, setArmed, setBehaviour, set, setEnabled, setNotify, setShadowType, setState, setStates |
Methods inherited from class com.pacist.diamonds.DiamondCanvas | |
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText |
Methods inherited from class java.awt.Canvas | |
addNotify, paint |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected java.lang.String label
protected java.awt.Image upImage
protected java.awt.Image downImage
protected java.awt.Image upDisabledImage
protected java.awt.Image downDisabledImage
protected int width
protected int height
protected int hMargin
protected int vMargin
protected int spacing
protected int imagePos
protected boolean showImage
protected boolean showLabel
protected boolean draw3DLabel
protected boolean canMeasure
Constructor Detail |
public FlexiButton()
public FlexiButton(java.awt.Image label)
public FlexiButton(java.lang.String label)
public FlexiButton(java.lang.String label, java.awt.Image upImage, int behaviour)
public FlexiButton(java.lang.String label, java.awt.Image upImage, java.awt.Image downImage, int behaviour)
public FlexiButton(java.lang.String label, java.awt.Image upImage, java.awt.Image downImage, java.awt.Image upDisabledImage, java.awt.Image downDisabledImage, int behaviour)
Method Detail |
public java.awt.Dimension preferredSize()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public int getImagePosition()
public void setImagePosition(int imagePos)
public java.awt.Image getUpImage()
Image
the current up-image.public void setUpImage(java.awt.Image ul)
Image
- the new up-image.public java.awt.Image getDownImage()
Image
the current down-image.public void setDownImage(java.awt.Image dl)
Image
- the new down-image.public java.awt.Image getUpDisabledImage()
Image
the current up-image.public void setUpDisabledImage(java.awt.Image udl)
Image
- the new up-disabled-image.public java.awt.Image getDownDisabledImage()
Image
the current up-image.public void setDownDisabledImage(java.awt.Image ddl)
Image
- the new down-disabled-image.public int getSpacing()
public void setSpacing(int spacing)
spacing
- the amount of space to leave.public boolean getShowImage()
boolean
- true
if the image is being shown; false
otherwise.public void setShowImage(boolean showImage)
showImage
- true
if image should be shown; false
otherwise.public boolean getShowLabel()
boolean
- true
if the label is being shown; false
otherwise.public void setShowLabel(boolean showLabel)
showLabel
- true
if label should be shown; false
otherwise.public boolean getDraw3DLabel()
boolean
- true
if the label is being shown in 3D; false
otherwise.public void setDraw3DLabel(boolean draw3DLabel)
draw3DLabel
- true
if label should be shown in 3D; false
otherwise.public int getHMargin()
public void setHMargin(int hMargin)
public int getVMargin()
public void setVMargin(int hMargin)
protected void measure()
protected java.awt.Image[] getImages()
Image[]
- an Image array containing, if present, the upImage, downImage, upDisabledImage, and downDisabledImage.protected java.awt.Dimension getLargestImageSize()
Dimension
- maximum width and height out of all of the images.public void addNotify()
protected java.awt.Image getCurrentImage()
Image
- the currently viewed image.public void paintButton(java.awt.Graphics g, boolean down)
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |